package com.zxn.dragdemo.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.zxn.dragdemo.bean.PictureInfo;
import com.zxn.dragdemo.R;

/**
 * Author by linkaikai
 * Date on 2020/3/12
 */
public class TestAdapter extends PicMgrAdapter<PictureInfo> {
    private Context mContext;

    public TestAdapter(Context context, int itemHeight) {
        super(context, itemHeight);
        mContext = context;
    }

    @Override
    protected void onBindData(PicViewHolder baseHolder, PictureInfo pic, int postion) {
        ImageView view = (ImageView) baseHolder.getView(R.id.img_pic);
        Glide.with(mContext).load(pic.path).into(view);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.item_pic;
    }
}
